import React, {useState} from "react";
export default function App() {
    const [account, setAccount] = useState('111');
    const [pwd, setPwd] = useState('')
    const onChangeAccount = (event)=>{
        if (event) {
            setAccount( event.target.value)
        }
        
    }
    const onChangePwd = (event)=>{
        setPwd(event.target.value)
    }
    return (
        <div>
            <input placeholder='输入账号'  onChange={(event)=>onChangeAccount(event)}></input>
            <input placeholder={'输入密码'}  onChange={(event)=> onChangePwd(event)}></input>
            <button>提交</button>
            <label>{account}</label>
            <label>{pwd}</label>
        </div>
    );
  }